<?php
/**
 * Created by PhpStorm.
 * User: wodrow
 * Date: 18-3-22
 * Time: 下午5:39
 */

namespace common\models\credit_app;

/**
 * Class OrderIndex
 * @package common\models\credit_app
 *
 * @property Order $order
 */
class OrderIndex extends \common\models\credit_app_tables\OrderIndex
{
    const TYPE_HIERARCHY_REVIEW = '层级审核';
    const TYPE_DATA_REVIEW = '资料审核';

    public static function primaryKey()
    {
        return [
            'ot_id',
            'ot_type',
        ];
    }

    /**
     * @return \yii\db\ActiveQuery
     */
    public function getOrder()
    {
        return $this->hasOne(Order::className(), ['o_id' => 'ot_id']);
    }
}